<?php

namespace app\common\validate;

use think\Validate;

class BusForm extends Validate
{
	protected $rule = [
		"account" => "require|unique:bus_form",
		"nickname" => "require",
		"phone" => "require|mobile|unique:bus_form",
		"address" => "require",
		"name" => "require",
	];
	protected $message = [
		"account.require" => "请输入账号",
		"account.unique" => "账号已经存在",
		"nickname.require" => "请输入团长昵称",
	
        "phone.require" => "手机号不可以为空", 
        "phone.mobile" => "手机号格式错误", 
        "phone.unique" => "该手机号已经存在",  
		
		"address.require" => "请输入详细地址",
		"name.require" => "请输入姓名",
		
	];

	protected $scene = [
		'add'  =>  ['nickname', 'phone', 'address','name'],
	];
}
